import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;

public class CCTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ArrayList<String> al = inputData();
		long time = System.currentTimeMillis();
		ArrayList<ArrayList<String>> dataList = new ArrayList<>();
		for (String a : al) {
			ArrayList<String> al1 = new ArrayList<>();
			dataList.add(al1);
			String s[] = a.split(";");
			for (String string : s) {
				al1.add(string);
			}
		}
		ArrayList<HashMap<String, Integer>> mapList = new ArrayList<>();
		for (int i = 1; i < dataList.size(); i++) {
			for (int j = 0; j < dataList.get(i).size(); j++) {
				if (dataList.get(i).get(j).trim().equals("?")) {
					HashMap<String, Integer> m = new HashMap<>();
					mapList.add(m);
					m.put("row", i);
					m.put("col", j);
				}
			}
		}
		int row = 0, col = 0;
		for (int i = 0; i < mapList.size(); i++) {
			row = mapList.get(i).get("row");
			col = mapList.get(i).get("col");
			try {
				switch (col) {
				case 1:
					if (!dataList.get(row).get(2).equals("?")
							&& !dataList.get(row).get(2).equals("0.00")) {
						dataList.get(row).set(col, "0.00");
						break;
					}
					if (row == 1) {
						System.out.println("not");
					} else {
						if (dataList.get(row).get(1).equals("?")
								&& dataList.get(row).get(2).equals("?")) {
							float f = Float.valueOf(dataList.get(row - 1)
									.get(3))
									- +Float.valueOf(dataList.get(row).get(3));
							String s = "" + String.format("%.2f", Math.abs(f));
							if (f > 0) {
								dataList.get(row).set(1, "0.00");
								dataList.get(row).set(2, s);
							} else {
								dataList.get(row).set(1, s);
								dataList.get(row).set(2, " 0.00");
							}
							break;
						}
						String s = ""
								+ String.format(
										"%.2f",
										-Float.valueOf(dataList.get(row - 1)
												.get(3))
												+ Float.valueOf(dataList.get(
														row).get(2))
												+ Float.valueOf(dataList.get(
														row).get(3)));
						dataList.get(row).set(col, s);
					}
					break;
				case 2:
					if (!dataList.get(row).get(1).equals("?")
							&& !dataList.get(row).get(1).equals("0.00")) {
						dataList.get(row).set(col, "0.00");
						break;
					}
					if (row == 1) {
						System.out.println("not");
					} else {
						String s = "";
						s = ""
								+ String.format(
										"%.2f",
										Float.valueOf(dataList.get(row - 1)
												.get(3))
												+ Float.valueOf(dataList.get(
														row).get(1))
												- Float.valueOf(dataList.get(
														row).get(3)));
						dataList.get(row).set(col, s);
					}
					break;
				case 3:
					if (row == 1) {
						String s = ""
								+ String.format(
										"%.2f",
										Float.valueOf(dataList.get(row + 1)
												.get(3))
												+ Float.valueOf(dataList.get(
														row + 1).get(2))
												- Float.valueOf(dataList.get(
														row + 1).get(1)));
						dataList.get(row).set(col, s);
					} else {
						String s = "";
						try {
							s = ""
									+ String.format(
											"%.2f",
											Float.valueOf(dataList.get(row - 1)
													.get(3))
													+ Float.valueOf(dataList
															.get(row).get(1))
													- Float.valueOf(dataList
															.get(row).get(2)));
						} catch (Exception e) {
							s = ""
									+ String.format(
											"%.2f",
											Float.valueOf(dataList.get(row + 1)
													.get(3))
													- Float.valueOf(dataList
															.get(row + 1)
															.get(1))
													+ Float.valueOf(dataList
															.get(row + 1)
															.get(2)));
						}
						dataList.get(row).set(col, s);
					}
					break;

				default:
					break;
				}

			} catch (Exception e) {
				 e.printStackTrace();
				if (mapList.size() >= 25)
					break;
				else {
					HashMap<String, Integer> m = new HashMap<>();
					mapList.add(mapList.size(), m);
					m.put("row", row);
					m.put("col", col);
					continue;
				}
			}
		}
		System.out.println(al.get(0));
		for (int i = 1; i < dataList.size(); i++) {
			System.out.println(dataList.get(i).get(0) + ";"
					+ dataList.get(i).get(1) + ";" + dataList.get(i).get(2)
					+ ";" + dataList.get(i).get(3));
		}
		// System.out.println(System.currentTimeMillis() - time);
	}

	public static ArrayList<String> inputData() {
		String stopStr = "";
//		System.out.println("请输入：");
		Scanner s = new Scanner(System.in, "GBK");
		ArrayList<String> al = new ArrayList<>();
		String a;
		do {
			a = s.nextLine().trim();
			if (!a.equals(stopStr))
				al.add(a);
		} while (!a.equals(stopStr));
		// System.out.println(al);
		s.close();
		return al;
	}
}
